
// ★命名空间一个最明确的目的就是解决重名问题。
namespace NameSpace1 {
    var str1: string = "不对外变量";
    export var str2: string = "对外变量";
    export var name = "NameSpace1";
    interface Animal {
        name: string;
        type: string;
    }

    export interface Animal2 {
        name2: string;
        type2: string;
    }

    // 与Module.ts同名,但是namespace不同,所处作用域不同
    export module Module {
        // export var name = "NameSpace1.Module";
        export function show() {
            console.log(name);
        }
    }

    class Dog implements Animal {
        public name: string;
        public type: string;
    }

    export class Dog2 implements Animal2 {
        public name2: string;
        public type2: string;
    }
}
